One major issue that arises during use of imaging devices in real world environments (outdoors, for example) is inconsistent lighting. Generally, inconsistent lighting can result in images of poor quality. In the context of machine vision systems, inconsistent lighting can create errors in machine vision outputs.
The inconsistent lighting is caused by changes in the light intensity, white balance and shadows. Color temperature is measured in degrees Kelvin (K), and the color temperature of an outdoor light source can vary significantly depending on cloud cover and time of day. For example, color temperature can vary from about 2000 K (reddish) in the morning to about 8000 K (bluish) in the shade. The temperature of white daylight is about 5600 K.
Certain known cameras have been engineered to attempt to compensate automatically for the changes in the source light color. However, the automatic systems and methods to date supply only an approximate compensation and errors in the output of imaging systems, including machine vision systems, still occur.
For example, most consumer video systems such as video cameras and security style cameras use a white balance algorithm to determine the color of the source light. This requires assumptions about what the camera is viewing. For example, an algorithm may be configured to assume that the operator is viewing one third sky and two thirds ground or buildings. The algorithm then determines the light source color as a mix with different weightings based on the amounts of red and blue in the different areas of the image. One issue with this system is that broad assumptions are prone to error and in the case of a machine vision system, every application may be different.
Professional video users and photographers use white cards to correct the white balance. This requires the operator to fill a portion of the view finder with the white card. The algorithm then recognizes that this area in the image should be white and can adjust the red and blue gains to achieve this. However, this method is not suitable for outdoor or machine vision use, because it is only applicable until the light source varies.
Another method that can be used by photographers is to use a white lens cover, set the camera to a manual white balance setting, and take a photo while pointing the camera at the sky. All subsequent photos are taken and stored in raw pixel data format. When the images are downloaded, they are then post-processed to compensate for the light source color. This method is not viable in a real-time machine vision system.
There is a need in the art for an improved imaging device and system that can automatically compensate for inconsistent lighting.